package com.dsa.team5.kanban.service.impl;

import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.dsa.team5.kanban.dao.TaskDao;
import com.dsa.team5.kanban.model.Task;
import com.dsa.team5.kanban.service.TaskService;

@Repository
public class TaskServiceImpl implements TaskService {

	@Autowired
	SessionFactory sessionFactory;

	@Autowired
	TaskDao taskDao;

	@Override
	public void save(Task task) {
		taskDao.save(task);

	}

	@Override
	public void update(Task task) {
		taskDao.update(task);

	}

	@Override
	public void delete(Task task) {
		taskDao.delete(task);
	}
	
	@Override
	public Task getTaskByTaskId(Long taskId) {
		return taskDao.getTaskByTaskId(taskId);
	}

	@Override
	public List<Task> getTaskByStatusId(Long statusId) {
		return taskDao.getTaskByStatusId(statusId);
	}
}
